﻿package mortal.game.proxy
{
    import Message.Game.*;
    import extend.language.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.mvc.*;
    import mortal.mvc.core.*;

    public class LevelRewardProxy extends Proxy
    {
        private var level:int = 0;

        public function LevelRewardProxy()
        {
            return;
        }// end function

        public function getLevelReward(param1:int) : void
        {
            this.level = param1;
            rmi.iPlayerPrx.getLevelReward_async(new AMI_IPlayer_getLevelReward(this.LoadHasGotGiftInfo), param1);
            return;
        }// end function

        private function LoadHasGotGiftInfo(param1:AMI_IPlayer_getLevelReward, param2:Boolean) : void
        {
            if (this.level != 0 && param2)
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.LevelRewardFlyToBackPack, this.level));
                MsgManager.showRollTipsMsg(Language.getString(20579));
                this.level = 0;
            }
            return;
        }// end function

    }
}
